package yc.star.forum.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * OpenAPI配置类
 */
@Configuration
public class SwaggerConfig {

    /**
     * OpenAPI 3配置
     */
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("论坛系统API")
                        .description("论坛系统API接口文档")
                        .version("1.0")
                        .contact(new Contact()
                                .name("星辰")
                                .url("https://github.com/yc-star")
                                .email("yc-star@qq.com")));
    }
}